/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.bridge.sub;

import ru.jSkyRoom.interfaces.sub.JSkyBodyTemplate;
import skyproc.BodyTemplate;
import skyproc.BodyTemplate.BodyTemplateType;
import skyproc.genenums.ArmorType;
import skyproc.genenums.FirstPersonFlags;

/**
 *
 * @author Rakev
 */
public class BodyTemplateBridge extends SubBridge<BodyTemplate> implements JSkyBodyTemplate {

    private BodyTemplate.BodyTemplateType type = BodyTemplateType.Normal;

    public BodyTemplateBridge(BodyTemplate adapting) {
        super(adapting);
    }

    public BodyTemplateBridge(BodyTemplate adapting, BodyTemplate.BodyTemplateType type) {
        super(adapting);
        this.type = type;
    }

    @Override
    public boolean getFlag(FirstPersonFlags flag) {
        return getRawObject().get(type, flag);
    }

    @Override
    public void setFlag(FirstPersonFlags flag) {
        getRawObject().set(type, flag, true);
    }

    @Override
    public void unsetFlag(FirstPersonFlags flag) {
        getRawObject().set(type, flag, false);
    }

    @Override
    public ArmorType getArmorType() {
        return getRawObject().getArmorType(type);
    }

    @Override
    public void setArmorType(ArmorType armorType) {
        getRawObject().setArmorType(type, armorType);
    }
}
